//
//  AllMusicCollectionViewCell.m
//  悦享
//
//  Created by dllo on 16/3/19.
//  Copyright © 2016年 张洪国. All rights reserved.
//

#import "AllMusicCollectionViewCell.h"

@interface AllMusicCollectionViewCell ()

@property (nonatomic, retain) UILabel *nameLabel;

@end

@implementation AllMusicCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        [self createViews];
    }
    return self;
    
}

- (void)setModel:(ChildrenModel *)model {
    
    _model = model;
    
    _nameLabel.text = model.tag;
    
}

- (void)createViews {
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    
    
    self.nameLabel.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    _nameLabel.backgroundColor = [UIColor lightGrayColor];
    _nameLabel.alpha = 0.5;
    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.textColor = [UIColor whiteColor];
    
}


@end










